feat: add workspace hydration primitives#131
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces workspace hydration primitives to persist a runtime’s working directory across executions by storing workspace files as Orchestrator job attachments and restoring them on subsequent runs (supporting suspend/resume scenarios).
Changes:
- Added a new
uipath.runtime.workspacepackage containingWorkspace,WorkspaceRegistryStore,WorkspaceHydrator, and theHydrationRuntimewrapper withHydrationPolicy. - Implemented reversible slash-free attachment naming to round-trip nested workspace paths, plus registry merging to propagate local deletions.
- Added a new test suite covering hydrate/dehydrate behavior, registry reconstruction from parent jobs, attachment name encoding, and persistence policies.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
uv.lock |
Updates locked dependency versions (notably uipath-core) and lock options. |
pyproject.toml |
Bumps project version and updates the uipath-core dependency constraint. |
src/uipath/runtime/__init__.py |
Re-exports workspace hydration primitives as part of the public runtime API. |
src/uipath/runtime/workspace/__init__.py |
Defines the public surface of the new workspace subpackage (__all__). |
src/uipath/runtime/workspace/workspace.py |
Adds workspace lifecycle management (create, dispose). |
src/uipath/runtime/workspace/registry_store.py |
Adds storage-backed registry persistence for attachment metadata. |
src/uipath/runtime/workspace/hydrator.py |
Implements attachment-backed hydrate/dehydrate, registry discovery from jobs, and path encoding/validation. |
src/uipath/runtime/workspace/hydration.py |
Adds the runtime wrapper (HydrationRuntime) and policy-based persistence behavior. |
tests/workspace/test_workspace_hydration.py |
Adds tests for the new workspace hydration and persistence behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ee09cb7 to
81234fe
Compare
81234fe to
e853dbf
Compare
|
PopescuTudor
approved these changes
Jun 24, 2026
viswa-uipath
added a commit
that referenced
this pull request
Jun 27, 2026
Adds the audit pipeline that records governance evaluations: an AuditManager that fans out per-evaluation records to registered sinks (console + traces), with per-instance lifecycle (one ThreadPoolExecutor + atexit hook keyed via a WeakSet of live managers — same shape the later GuardrailCompensator slice reuses). Sinks ----- - Console sink for local development and CLI runs. - Traces sink that emits an OTel span per evaluation; severity is mapped from the matched rule's enforcement mode (audit / enforce / guardrail_fallback) so downstream traces UIs can filter by it. Companion changes pulled in via the main-merge on this branch ------------------------------------------------------------- This branch was kept in sync with main during review; the diff therefore includes the following work that originated in other PRs and will already be merged by the time this lands: - Workspace hydration primitives (hydration, hydrator, registry_store, workspace; from PR #131). - ``execution_source`` derived field on the runtime context (from PR #132). Co-Authored-By: Aditi Kumari <aditi.kumari@uipath.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
viswa-uipath
added a commit
that referenced
this pull request
Jun 27, 2026
Adds the audit pipeline that records governance evaluations: an AuditManager that fans out per-evaluation records to registered sinks (console + traces), with per-instance lifecycle (one ThreadPoolExecutor + atexit hook keyed via a WeakSet of live managers — same shape the later GuardrailCompensator slice reuses). Sinks ----- - Console sink for local development and CLI runs. - Traces sink that emits an OTel span per evaluation; severity is mapped from the matched rule's enforcement mode (audit / enforce / guardrail_fallback) so downstream traces UIs can filter by it. Companion changes pulled in via the main-merge on this branch ------------------------------------------------------------- This branch was kept in sync with main during review; the diff therefore includes the following work that originated in other PRs and will already be merged by the time this lands: - Workspace hydration primitives (hydration, hydrator, registry_store, workspace; from PR #131). - ``execution_source`` derived field on the runtime context (from PR #132). Co-Authored-By: Aditi Kumari <aditi.kumari@uipath.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
viswa-uipath
added a commit
that referenced
this pull request
Jun 27, 2026
Adds the audit pipeline that records governance evaluations: an AuditManager that fans out per-evaluation records to registered sinks (console + traces), with per-instance lifecycle (one ThreadPoolExecutor + atexit hook keyed via a WeakSet of live managers — same shape the later GuardrailCompensator slice reuses). Sinks ----- - Console sink for local development and CLI runs. - Traces sink that emits an OTel span per evaluation; severity is mapped from the matched rule's enforcement mode (audit / enforce / guardrail_fallback) so downstream traces UIs can filter by it. Companion changes pulled in via the main-merge on this branch ------------------------------------------------------------- This branch was kept in sync with main during review; the diff therefore includes the following work that originated in other PRs and will already be merged by the time this lands: - Workspace hydration primitives (hydration, hydrator, registry_store, workspace; from PR #131). - ``execution_source`` derived field on the runtime context (from PR #132). Co-Authored-By: Aditi Kumari <aditi.kumari@uipath.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
uipath.runtime.workspace:Workspace,WorkspaceRegistryStore,WorkspaceHydrator, andHydrationRuntime/HydrationPolicyfor persisting an agent's working directory across executions via job attachmentsdepends on UiPath/uipath-python#1744